#define __LISTS_H__
#pragma once

#include "libraries.h"
#include "CObject.h"
#include "CCreature.h"
#include "CBuilding.h"

typedef CObject *PCOBJECT;

typedef std::list <PCOBJECT > ObjectsList; 
typedef std::list<PCOBJECT >::iterator OBJECT_ITERATOR;

extern ObjectsList OL;

typedef CBuilding *PBUILDING;

typedef std::list <PBUILDING > BuildingsList; 
typedef std::list<PBUILDING >::iterator BUILDING_ITERATOR;

extern BuildingsList BL;

typedef CCreature *PCREATURE;

typedef std::list <PCREATURE > CreaturesTeam; 
typedef std::list<PCREATURE >::iterator CREATURE_ITERATOR;

extern CreaturesTeam GCT;
extern CreaturesTeam CECT, NECT, LECT;

void OE_Move();
void OE_Process();
void OE_Draw();
void OE_FindLEMotherCreature(CCreature *MyP, int MotherType, int MyX, int MyY);
void OE_FindNEMotherCreature(CCreature *MyP, int MotherType, int MyX, int MyY);
void OE_FindCEMotherCreature(CCreature *MyP, int MotherType, int MyX, int MyY);
void OE_SelectUnit(int X, int Y);